package com.dsideal.cloud.cas.client.entity;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @program: parent
 * @description: 定义查询教师登录用户信息结果
 * @author: zw
 * @create: 2021-04-19 15:01
 **/
public class TeacherRowMapper implements RowMapper<UserLog> {

    @Override
    public UserLog mapRow(ResultSet rs, int rowNum) throws SQLException {
        //获取结果集中的数据封装成对象返回
        UserLog userLog = UserLog.builder()
                .baseUserId(rs.getString("base_user_id"))
                .userName(rs.getString("user_name"))
                .loginName(rs.getString("login_name"))
                .yjId(rs.getString("yj_id"))
                .bureauId(rs.getString("bureau_id"))
                .bureauName(rs.getString("organization_name"))
                .identityCode(rs.getString("identity_code"))
                .sex(rs.getString("sex"))
                .bureauStage(rs.getString("yj_xd"))
                .build();
        return userLog;
    }
}
